#
#
#
# def lastRemaining(n,m):
#     """
#     :type n: int
#     :type m: int
#     :rtype: int
#     """
#     num, cnt = n, 1
#     if m == 1:
#         return n
#     list = [i for i in range(1,n+1)]
#     i = 1
#     print(list)
#     while num > 1:
#         if cnt == m:
#             list.pop(i)
#             cnt = 1
#             num -= 1
#             if i == num :
#                 i = 1
#         else:
#             i += 1
#             cnt += 1
#             if i >= num:
#                 i = 0
#
#     return list[0]
# a = lastRemaining(10,1)
# print(a)
# alist = [3,2,5,9,10,1,6,8,2,4]
# ln = len(alist)
# for i in range(0,ln-1):
#     for j in range(0,ln-1-i):
#         if alist[j] > alist[j+1]:
#             alist[j],alist[j+1] = alist[j+1],alist[j]
#
# print("-------完毕-------")
# print(alist)

from aip import AipNlp
import json
from learning_platform.settings import SECRET_KEY
""" 你的 APPID AK SK """
appId = '27632950'
apiKey = 'bNan6blroq4BSkfMCqpmbCfK'
secretKey = '50iNFlzPP3Y8RgVKhXOCqsup3DlGpOSz'
client = AipNlp(appId, apiKey, secretKey)

title = "iphone手机出现“白苹果”原因及解决办法，用苹果手机的可以看下"

content = "如果下面的方法还是没有解决你的问题建议来我们门店看下成都市锦江区红星路三段99号银石广场24层01室。"

""" 调用文章标签 """
dic = client.keyword(title, content)
print(json.dumps(dic,ensure_ascii=False,sort_keys=True, indent=4, separators=(',', ': ')))
